﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using VipCo.Data;
using VipCo.Entities;

public partial class Controls_DanhMucControl : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
        {
            HienthiDanhsachCm();
        }
    }

    /// <summary>
    /// 
    /// </summary>
    protected void HienthiDanhsachCm()
    {
        int totalRows = 0;
        string whereClause = "TrangThai = 1";
        TList<NhomChuyenMuc> tlistChuyenMucs = DataRepository.NhomChuyenMucProvider.GetPaged(whereClause, "Id DESC", 0,
            0, out totalRows);
        if (tlistChuyenMucs.Count > 0)
        {
            dlNhomchuyenmuc.DataSource = tlistChuyenMucs;
            dlNhomchuyenmuc.DataBind();
        }
    }

    public string GetTieuDe(object Char)
    {
        string s = Char.ToString();
        return Common.ConvertToUnSign(s);
    }
}